package com.kty.cesuan.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kty.cesuan.config.R;
import com.kty.cesuan.pojo.Knowledge;
import com.kty.cesuan.service.KnowledgeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/info")
public class KnowledgeController {

    @Autowired
    private KnowledgeService knowledgeService;

//**********************************************************************************************************************

    /**
     * 查询测算信息
     *
     * @param page 页数
     * @param pageSize 每页条数
     */
    @GetMapping("/page")
    public R<Page<Knowledge>> page(int page, int pageSize) {

        // 查询
        Page<Knowledge> pageInfo = knowledgeService.pageInfo(page, pageSize);

        // 返回结果
        return R.success(pageInfo);

    }

}
